/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author            Notes
 * 2021-01-04     iysheng           first version
 */

#include <rtdbg.h>
#include <stdio.h>
#include <rtthread.h>
#include <sy_uart.h>
#include "sy_write_thread.h"
#include "sy_bc26.h"
#include "board.h"
#include "sy_zigbee.h"
#include "sy_flash.h"
#include "sy_rs485.h"
#include "sy_fs.h"

int main(void)
{
    uart_init();
    fs_init();
    write_thread_init();
    Rs485_init();
    rt_thread_mdelay(1000);
    //Bc26_Init();
    rt_device_t rs485=Get_Rs485Dev();
    while (1)
    {
        //rt_kprintf("flash:%s\n",rec_buf);
        unsigned char buf[]={0xFC,0x07,0x03,0x03,0x00,0x00,0x31,0x32,0x33};
        //Zigbee_SendData(buf,sizeof(buf));
        //Rs485_SendData(rec_buf,rt_strlen(rec_buf));
        rt_thread_mdelay(5000);
    }

    return 0;
}
